﻿using System;
using System.Collections.Generic;

namespace WordpressRestApi
{
    /// <summary>Parametrization to query posts.</summary>
    public class PostParametrization
    {
        /// <summary>Size (# of posts) in one REST API call.</summary>
        public int? Number { get; set; }

        /// <summary>List of fields to return.  Default returns all the fields.</summary>
        public IEnumerable<PostField> Fields { get; set; }

        /// <summary>Status of post.</summary>
        public PostStatus? Status { get; set; }

        /// <summary>Type of post.</summary>
        public string PostType { get; set; }

        /// <summary><c>true</c> for ascending order, <c>false</c> for descending.</summary>
        public bool OrderByAscending { get; set; }

        /// <summary>
        /// Wordpress currently supports only <see cref="PostField.ID"/>, <see cref="PostField.Date"/>,
        /// <see cref="PostField.ModifiedDate"/> &amp; <see cref="PostField.Title"/>.
        /// </summary>
        public PostField? OrderByField { get; set; }

        /// <summary>When specified, only posts associated with that tag will be fetched.</summary>
        public string TagSlug { get; set; }
    }
}